<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <title></title>
        <style> 
        input[type="text"]:hover{/*悬停 掠过*/
            background-color: blue;
        }
        input[type="text"]:focus{/*点击 焦点*/
            background-color: blueviolet;
        }
        input[type="text"]:active{
            background-color: brown;
        }
        </style>
    </head>
   <body>
       <input type="text" name="name">
       <input type="text" name="age">
   </body>
</html>